# -*- coding: utf-8 -*-
'''
@author: Hugo
@file: mq.py
@time: 2021/8/25 16:16
'''
'''
User-Agent	Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36

time_interval=&industry=&page=1&num=20&unionid=
'''
import requests
import execjs

import httpx
cookies = {

    'HMACCOUNT_BFESS': '9222D5FFD3E96702',
    'BAIDUID_BFESS': '880BD9491621ABD1729CEB0769CA90BC:FG=1',
    'BCLID_BFESS': '10759634311750026771',
    'BDSFRCVID_BFESS': '9oIOJexroG38vSnH5VCkbo5Vc2KKg9TTDYLtOwXPsp3LGJLVgMtPEG0Pt8i0Cou-dk83ogKK3gOTH4PF_2uxOjjg8UtVJeC6EG0Ptf8g0M5',
    'H_BDCLCKID_SF_BFESS': 'fR-f_D_5fIvDqTrP-trf5DCShUFsq4RAB2Q-XPoO3K8WfxOky5o4LPPVhNop55jiWKk8-UbgylRM8P3y0bb2DUA1y4vpKMrJLgTxoUJ2fnI2En7GqtOOe5tebPRiJ-b9Qg-JbpQ7tt5W8ncFbT7l5hKpbt-q0x-jLTnhVn0MBCK0HPonHjLMDTv03e',
}

headers = {
    'Connection': 'keep-alive',
    'Cache-Control': 'no-cache',
    'sec-ch-ua': '" Not;A Brand";v="99", "Google Chrome";v="91", "Chromium";v="91"',
    'sec-ch-ua-mobile': '?0',
    'Upgrade-Insecure-Requests': '1',
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36',
    'Accept': 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8',
    'Sec-Fetch-Site': 'same-origin',
    'Sec-Fetch-Mode': 'no-cors',
    'Sec-Fetch-User': '?1',
    'Sec-Fetch-Dest': 'image',
    'Accept-Language': 'zh-CN,zh;q=0.9',
    'If-None-Match': 'W/"6120bc6d-c01"',
    'If-Modified-Since': 'Sat, 21 Aug 2021 08:42:21 GMT',
    'Referer': 'https://qimingpian.cn/',
    'Origin': 'https://qimingpian.cn',
    'authority': 'img1.qimingpian.cn',
    'if-none-match': '"5c934530-1f81"',
    'if-modified-since': 'Thu, 21 Mar 2019 08:02:56 GMT',
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36',
    'accept': 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8',
    'sec-fetch-site': 'same-site',
    'sec-fetch-mode': 'no-cors',
    'sec-fetch-dest': 'image',
    'accept-language': 'zh-CN,zh;q=0.9',
    'referer': 'https://qimingpian.cn/',
    'Content-Type': 'application/x-www-form-urlencoded',
    'Pragma': 'no-cache',
}

data = {
  'time_interval': '',
  'industry': '',
  'page': '1',
  'num': '20',
  'unionid': ''
}
response = requests.post('https://vipapi.qimingpian.cn/DataList/investmentTotalVip',  cookies=cookies, data=data)
res = response.json().get('encrypt_data')

f = open('D:\TulingPaCong\day15js逆向百度翻译\qm.js','r').read()
ctx = execjs.compile(f)
data = ctx.call('o',res)
print(data)
f.close()









